#include <iostream>
#include <string>


#define DEFINE_TEST_FUNCTION(f) extern bool f();

using namespace std;
static string result2string(int r);

/********** rexp_test.cpp **********/
DEFINE_TEST_FUNCTION(rexp_test_match_found)
DEFINE_TEST_FUNCTION(rexp_test_match_not_found)

/********** valbyref.cpp **********/
DEFINE_TEST_FUNCTION(test_value_by_reference)

/********** val2string.cpp **********/
DEFINE_TEST_FUNCTION(val2stringint)
DEFINE_TEST_FUNCTION(val2stringdouble)
DEFINE_TEST_FUNCTION(val2stringfloat)
DEFINE_TEST_FUNCTION(val2stringlong)
DEFINE_TEST_FUNCTION(val2stringlonglong)

/********** factory.cpp **********/
DEFINE_TEST_FUNCTION(factory_test_signlton_empty)
DEFINE_TEST_FUNCTION(factory_test_signlton_not_empty)
DEFINE_TEST_FUNCTION(factory_test_not_signlton_not_empty)
DEFINE_TEST_FUNCTION(factory_test_inheritance)
DEFINE_TEST_FUNCTION(factory_test_clear)

/********** math.cpp **********/
DEFINE_TEST_FUNCTION(round_test_template)
DEFINE_TEST_FUNCTION(round_test_runtime)

string result2string(bool r)
{
  return (r == true ? "PASSED" : "NOT POASSED")	;
}


int main(int argc, char* argv[])
{
  int result = 0;
  cout << ">>> TEST: Regular Expressions [match:found] " << result2string(rexp_test_match_found()) << endl;
  cout << ">>> TEST: Regular Expressions [match: not found] " << result2string(rexp_test_match_not_found()) << endl;
  cout << ">>> TEST: send default value by reference " << result2string(rexp_test_match_not_found()) << endl;
  cout << ">>> TEST: value to string<int> " << result2string(val2stringint()) << endl;
  cout << ">>> TEST: value to string<double> " << result2string(val2stringdouble()) << endl;
  cout << ">>> TEST: value to string<float> " << result2string(val2stringfloat()) << endl;
  cout << ">>> TEST: value to string<long> " << result2string(val2stringlong()) << endl;
  cout << ">>> TEST: value to string<long long> " << result2string(val2stringlonglong()) << endl;

 cout << ">>> TEST: factory singlton empty " << result2string(factory_test_signlton_empty()) << endl;
 cout << ">>> TEST: factory singlton not empty " << result2string(factory_test_signlton_not_empty()) << endl;
 cout << ">>> TEST: factory not singlton not empty " << result2string(factory_test_not_signlton_not_empty()) << endl;
 cout << ">>> TEST: factory inheritance " << result2string(factory_test_inheritance()) << endl;
 cout << ">>> TEST: factory deregistrate Object " << result2string(factory_test_clear()) << endl;

 cout << ">>> TEST: math.library.round.template " << result2string(round_test_template()) << endl;
 cout << ">>> TEST: math.library.round.runtime " << result2string(round_test_runtime()) << endl;


  return 0;
}
